Skip to content

Conversation

@Xyerophyte
Copy link

Description

This PR adds a lightweight, dependency-free tool to convert UI5-style api.json files into browsable HTML documentation.

Problem Statement

Users commonly ask:

  • How to use the api.json files generated by ui5 build jsdoc
  • How to generate HTML documentation for internal hosting
  • Whether there are plans to add HTML output to the build jsdoc task

Solution

Added a converter tool (tools/convert-apijson-to-html.cjs) that:

  • Converts api.json → standalone HTML with zero dependencies
  • Provides a convenient npm script: npm run apijson-to-html
  • Generates self-contained, browsable documentation
  • Works offline and is easy to integrate into CI/CD pipelines

Files Added

  • tools/convert-apijson-to-html.cjs - Main converter script (115 lines)
  • tools/README.md - Detailed tool documentation with usage examples
  • docs/API_DOCUMENTATION.md - Comprehensive guide covering all api.json workflows
  • package.json - Added apijson-to-html npm script

Key Features

  • ✅ Zero external dependencies
  • ✅ Follows all project code conventions (tabs, double quotes, ESLint style)
  • ✅ Self-contained HTML output with TOC, properties, methods, examples
  • ✅ Works with UI5 builder's api.json format
  • ✅ Tested and working

Documentation

The new docs/API_DOCUMENTATION.md provides:

  • Clear explanation of api.json vs. JSDoc HTML outputs
  • Three approaches for HTML generation
  • Integration workflows for internal documentation
  • Examples and best practices

Testing

  • ✅ Script syntax validated
  • ✅ End-to-end tested with sample api.json
  • ✅ No VSCode errors
  • ✅ package.json valid

Related

This addresses a common community question about using the output from ui5 build jsdoc and provides a practical solution without requiring the full UI5 SDK infrastructure.

Add a lightweight Node.js tool to convert UI5-style api.json files
into browsable HTML documentation. This addresses the common need
for quick HTML generation from the output of 'ui5 build jsdoc'.

Added files:
- tools/convert-apijson-to-html.cjs - Converter script
- tools/README.md - Tool usage documentation
- docs/API_DOCUMENTATION.md - Complete API documentation guide
- package.json - Added 'apijson-to-html' npm script

The tool is dependency-free, produces self-contained HTML, and
provides an alternative to setting up the full UI5 SDK infrastructure
for internal documentation hosting.
@cla-assistant
Copy link

cla-assistant bot commented Nov 1, 2025

CLA assistant check
All committers have signed the CLA.

@RandomByte
Copy link
Member

Hi @Xyerophyte, It's unclear to us which "common community question" you are trying to address here. Could you link to that?

We don't think this PR, in it's current form, fits into the UI5 CLI project. Could you clarify how you envision this to be integrated into the CLI and which UI5 development scenarios you are trying to solve here?

Best regards,
Merlin

@RandomByte RandomByte added the information required Further information is required label Nov 3, 2025
@Xyerophyte
Copy link
Author

#911

@RandomByte
Copy link
Member

#911

Thank you. If you don't mind, we would appreciate your answer to my second question.

Also, could you please clarify whether you are making this contribution with the intention of using this feature yourself, or rather to resolve the linked issue (i.e. not for your own use)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

information required Further information is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants